if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
    pkg_check_modules(gtest_main QUIET IMPORTED_TARGET gtest_main)
    set(packages PkgConfig::gtest_main)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
    # TODO
    message(FATAL_ERROR "TODO")
else()
    message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}")
endif()

if(gtest_main_FOUND)
    build_all_target(${packages})
else()
    get_filename_component(CURRENT_DIR_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
    message(STATUS "gtest_main not found! Skipping ${CURRENT_DIR_NAME}")
endif()
